<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="/WEB-INF/jsp/top.jsp"/>

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Oauth2 Server 应用列表</title>
    <jsp:include page="/WEB-INF/jsp/top.jsp"/>
</head>

<body>

<div style="padding: 20px;">
    <div class="">

        <div class="header clearfix">
            <nav>
                <ul class="nav nav-pills pull-right">
                </ul>
            </nav>
            <h3 class="text-muted"><span style="font-style: italic;">OAuth2 Server</span> 用户列表</h3>
        </div>

        <br>
        <c:if test="${not empty msg}">
            <div class="alert alert-danger" role="alert">${msg}</div>
        </c:if>

        <a href="${pageContext.request.contextPath}">首页</a>
        <a href="${pageContext.request.contextPath}/user/create">用户新增</a>

        <table class="table table-bordered table-hover table-condensed" style="width: 1024px;margin-top: 20px;">
            <tr>
                <th>用户名</th>
                <th>密码</th>
                <th>操作</th>
            </tr>
            <c:if test="${not empty userList}">
                <c:forEach items="${userList}" var="user">
                    <tr>
                        <td>${user.username}</td>
                        <td>${user.password}</td>
                        <td width="30%">
                            <a href="${pageContext.request.contextPath}/user/${user.id}/update">修改</a>
                            <a href="${pageContext.request.contextPath}/user/${user.id}/delete">删除</a>
                            <a href="${pageContext.request.contextPath}/user/${user.id}/changePassword">改密</a>
                        </td>
                    </tr>
                </c:forEach>
            </c:if>
        </table>

    </div>

    <br>
    <jsp:include page="../footer.jsp"/>

</div>

</body>
</html>